<?php
/**
 * @since 2012.01.19.
 * @author Németh Roland
 * @link http://binga.hu/
 * @package Facebook module
 * ______ _____ _   _ _____  ___  
 * | ___ \_   _| \ | |  __ \/ _ \ 
 * | |_/ / | | |  \| | |  \/ /_\ \
 * | ___ \ | | | . ` | | __|  _  |
 * | |_/ /_| |_| |\  | |_\ \ | | |
 * \____/ \___/\_| \_/\____|_| |_/
 * 
 */
 
$admin_pre_folder = "../../";

include $admin_pre_folder.'class.php';

if(isset($_GET['at'])){
	$at = "'".$_GET['at']."'";
	$accessToken = array('accessToken' => $at);
	$sql->mysql_select("accesstokens", "accessToken", "accessToken=".$at);
	if($sql->get_mysql_num_row()==0){
		if($sql->mysql_insert("accesstokens", $accessToken)===false) {
			echo "0";
		} else {
			echo "1";
		}
	} else {
		echo "1";
	}
} else {
	echo "0";
}

?>